import urllib
urlread = lambda url:urllib.urlopen(url).read()
import chardet
checkedencoding =  chardet.detect(urlread("http://www.xinhuanet.com/sports/"))
print checkedencoding['encoding']
